/**
 * @company : 版权所属 四川北星惯牌科技有限公司
 * @contact : 刘经理 19326416371
 **/
import request from '@/utils/request.js';
var baseUrl = 'https://gapi.jixingge.com'
const uploadFile = {
	uploadFilePromise: (url) => { //获取用户信息
		return new Promise((resolve, reject) => {
			let a = uni.uploadFile({
				url: baseUrl + '/common/upload', // 仅为示例，非真实的接口地址
				filePath: url,
				name: 'file',
				header: {
					'token': uni.getStorageSync('user_token')
				},
				success: (res) => {
					// console.log('Promise', res);
					if (res.statusCode == 200) {
						let newdata = JSON.parse(res.data);
						resolve(newdata);
					}
				},
			});
		});
	}
}
export default uploadFile;